package com.hongdee.crm.activity.service;


import com.hongdee.crm.activity.entity.TCrmCarActivity;
import com.hongdee.crm.activity.entity.TCrmCarActivityAllocation;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.util.List;
import java.util.Map;

/**
 * 名  称:ITCrmCarActivityService
 * 类  型: interface
 * 描  述:
 * 路  径:com.hongdee.crm.activity.service;
 * 作  者: 术洪超
 * 日  期:2017-02-24 14:41
 */
public interface ITCrmCarActivityService {

    /**
     * @return Map
     * @throws Exception
     * @desc 通过 JDBCDao分页查询
     * @author 术洪超
     */
    public Map page(String id, String status, String time, String start, String limit, String uid,String deptId,String companyId,
                    String area,String brand) throws Exception;

    /**
     * @param id 主键 ID
     * @return Map
     * @throws Exception
     * @desc 查询详情
     * @author 术洪超
     */
    public Map info(String id) throws Exception;

    /**
     * @param data 要保存的变更的活动实体
     * @return Map
     * @throws Exception
     * @desc 保存添加或者修改的实体内容，通过主键判断
     * @author 术洪超
     */
    public TCrmCarActivity saveOrUpdate(TCrmCarActivity data, String uid) throws Exception;

    /**
     * @param id     主键 ID
     * @param status 状态
     * @return
     * @throws Exception
     * @desc 修改活动状态
     * @author 术洪超
     */
    public void update(String id, String status) throws Exception;


    /**
     * @param id       主键 ID
     * @param stopDate 要修改的时间
     * @return
     * @throws Exception
     * @desc 延长活动时间
     * @author 术洪超
     */

    public void exTime(String id, Long stopDate) throws Exception;

    /**
     * @return
     * @throws Exception
     * @desc 活动下拉列表
     * @author 术洪超
     */
    public List<Map> combo(String uid, String inUse,String companyId) throws Exception;


    /**
     * @return Map
     * @throws Exception
     * @desc 通过 JDBCDao分页查询
     * @author 术洪超
     */
    public Map alPage(String activityId, String start, String limit, String uid) throws Exception;


    /**
     * @param usercarId 要保存的变更的分配实体
     * @return
     * @throws Exception
     * @desc 保存添加或者修改的实体内容，通过主键判断
     * @author 术洪超
     */
    public void alSave(List<Map<Object, String>> usercarId, String uid, String activityId) throws Exception;


    public HSSFWorkbook export(List<TCrmCarActivity> list, String uid) throws Exception;


    public List<TCrmCarActivity> findList(String id, String status, String time, String start, String limit, String uid,String deptId,
                                          String companyId,String area,String brand) throws Exception;
    public List<TCrmCarActivity> activity(String uid) throws Exception;
    public HSSFWorkbook exportActivity(List<TCrmCarActivity> list, String uid) throws Exception;
    public List ActivePageOut(String start, String limit,Map data, String uid,String name) throws Exception;
    public XSSFWorkbook ActivityExcel(List list , String uid) throws Exception;

     /**
     * 获得当前用户所在公司的活动信息
     * @param uid
     * @return
     * @throws Exception
     */
    public List<Map<String,Object>> getActivityIng(String uid,String companyId,String vin) throws Exception;

    /*****
     * 自动给优惠券挂载工单
     */
    public void autoRefWorkOrder() throws Exception;
}
